package cn.zebra.dev.product.module.comment.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商品评论表
 *
 * @author runnable
 */
@TableName("product_comment")
@Getter
@Setter
public class ProductCommentEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户id")
    private Long memberId;

    @ApiModelProperty("用户名")
    private String memberName;

    @ApiModelProperty("用户头像")
    private String memberHeadImg;

    @ApiModelProperty("订单id")
    private Long ordersId;

    @ApiModelProperty("商品id")
    private Long productId;

    @ApiModelProperty("商品sku id")
    private Long productSkuId;

    @ApiModelProperty("购买时商品属性值 (数组格式:[金色, 16GB])")
    private String productAttributes;

    @ApiModelProperty("评分1(1-5)")
    @TableField(exist = false)
    private Integer scoreOne;

    @ApiModelProperty("评分2(1-5)")
    @TableField(exist = false)
    private Integer scoreTwo;

    @ApiModelProperty("评分3(1-5)")
    @TableField(exist = false)
    private Integer scoreThree;

    @ApiModelProperty("评价内容")
    private String content;

    @ApiModelProperty("商品图片数组")
    private String imageUrl;

    @ApiModelProperty("评价来源")
    private Integer sourceType;

    @ApiModelProperty("点赞总数")
    private Long thumbCount;

    @ApiModelProperty("回复总数")
    private Long replyCount;

    @ApiModelProperty("评价时间")
    private LocalDateTime createTime;

    @ApiModelProperty("是否可见")
    private Boolean showFlag;

    @ApiModelProperty("是否删除")
    private Boolean deleteFlag;
}
